// Domien Nowicki & Raf Lempens
#include "QtWallSprite.h"


QtWallSprite::QtWallSprite(QtSprite *parent): QtPixmapSprite(parent)
{
	SetDepth(1);
	SetResource("foreground", "wall");
}

QtWallSprite::~QtWallSprite()
{
}


void QtWallSprite::SetDirection(const Direction& direction)
{
	switch(direction.Type())
	{
		case Direction::NORTH:
			SetAngle(0);
		break;

		case Direction::SOUTH:
			SetAngle(180);
		break;
	
		case Direction::WEST:
			SetAngle(270);
		break;
	
		case Direction::EAST:
			SetAngle(90);
		break;
	}
}

void QtWallSprite::SetCellSize(unsigned int width, unsigned int height)
{
	SetCenterPoint(QPointF(width/2, height/2));
}






